package com.morehair.controller.wx;

import com.morehair.bean.bo.wx.WxFootprintBo;
import com.morehair.bean.vo.admin.BaseRespVo;
import com.morehair.bean.vo.wx.WxFootprintVo;
import com.morehair.service.wx.WxFootprintService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/wx/footprint")
@Transactional
public class WxFootprintControllor {

    @Autowired
    WxFootprintService footprintService;
    @RequestMapping("list")
    public BaseRespVo listFootprint(WxFootprintBo footprintBo){
        WxFootprintVo footprintVo = footprintService.getFootprint(footprintBo);
        return BaseRespVo.ok(footprintVo);
    }

    @RequestMapping("delete")
    public BaseRespVo deleteFootprint(@RequestBody Map map){
        footprintService.deleteFootprint(map);
        return BaseRespVo.ok();
    }
}
